package cn.china.feign.controller;


import cn.china.feign.myfeign.StudentFeign;
import entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentController {
    @Autowired
    StudentFeign studentFeign;

    @RequestMapping(value = "/insert",produces = "application/json;charset=utf-8")
    public int insert(){
        return studentFeign.insert(new Student("hello","男","5班","123"));
    }

    @RequestMapping(value = "/showInfo",produces = "application/json;charset=utf-8")
    public Student showInfo(){
        return studentFeign.showInfo()









                  ;
    }

}
